package API;

import java.io.File;
import java.io.FileFilter;

public class FileAPI {
    //作业1
    @Test
    public void testHomework1() {
        //创建多层文件夹
        File parent = new File("demo");
        File child1 = new File(parent, "abc");
        File child2 = new File(child1, "bcd");
        //测试删除
        child2.delete();
        child1.delete();
        parent.delete();


        //作业2
        parent.listFiles(new FileFilter() {
            public boolean accept(File pathname) {
                return false;
            }
        });
    }
}
